package eclipse.weibo.service;

import java.util.List;

import weibo4j.Comment;
import eclipse.weibo.util.WeiboUtil;

public class ReadMyCommentThread extends Thread {
    private MyObservable ob;
    private int i;

    public ReadMyCommentThread(MyObservable ob, int i) {
        this.ob = ob;
        this.i = i;
    }

    public void run() {
        List<Comment> list = null;
        if (this.i == 0) {
            list = WeiboUtil.getMyComment(0);
        } else if (this.i == 1) {
            list = WeiboUtil.getMyComment(1);
        } else if (this.i == -1) {
            list = WeiboUtil.getMyComment(-1);
        }
        this.ob.notifyObservers(list);
    }
}
